// VGroup.h
//
#ifndef VGROUP_H
#define VGROUP_H

#include "VObject.h"

#include "OpenGL/Math.h"

namespace OpenGL {
	class Renderer;
}


class VGroup : public VObject
{
private:
	std::vector<VObjectPtr>        _objects;

public:
	VGroup();
	~VGroup();

	void                             addObject( const VObjectPtr &obj );
	std::vector<VObjectPtr>          objects() const;
	std::vector<OpenGL::Math::dvec3> snapPoints() const;
	OpenGL::Math::dvec3              center() const;

	void draw( OpenGL::Renderer *r ) const;
	void drawForSelection( OpenGL::Renderer *r ) const;
	bool intersects( const OpenGL::Math::box3 &b ) const;

	std::vector<OpenGL::Math::dvec3> getPoints() const;
	VObject* clone() const;

	ObjectType type() const   { return Group;}
};


#endif